﻿@using System.Collections
@model MMSWebsite.Models.Group
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <p style="color: red">@ViewBag.GroupExistedError</p>


        <div class="editor-label">
            @Html.LabelFor(model => model.GroupName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.GroupName)
            @Html.ValidationMessageFor(model => model.GroupName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.Description)
        @Html.ValidationMessageFor(model => model.Description)
    </div>
    string value = string.Empty;
    if (Model.Responsibility != null) {value = Model.Responsibility.Employee.Name;}
    <div>@Html.Label("ResponsibleReviewer") @Html.DropDownList("Responsibility", new SelectList(ViewBag.Reviewers as IEnumerable), value)</div>
    Html.RenderPartial("SetAreaForGoupPartial");

}
<div>
    @Html.ActionLink("Back to List", "Index","Group")
</div>